package com.yqg.education.mapper;

import com.yqg.education.entity.LivePlayback;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author zxf
 * @since 2025-07-11
 */
@Mapper
public interface LivePlaybackMapper extends BaseMapper<LivePlayback> {

    List<LivePlayback> findPage(@Param("pageNum") Long pageNum,
                                @Param("pageSize") Long pageSize,
                                @Param("courseId") Long courseId,
                                @Param("teachId") Long teachId);

    Long findCount(@Param("courseId") Long courseId,
                   @Param("teachId") Long teachId);


    List<LivePlayback> stuFindPage(@Param("pageNum") Long pageNum,
                                   @Param("pageSize") Long pageSize,
                                   @Param("courseIds") List<Long> courseIds,
                                   @Param("courseId") Long courseId,
                                   @Param("teachId") Long teachId);

    Long stuFindCount(@Param("courseIds") List<Long> courseIds,
                      @Param("courseId") Long courseId,
                      @Param("teachId") Long teachId);

    @Select("select count(*) from live_playback where is_delete = 0")
    Long getInfoCount();
}
